<?php echo ''; ?>
<fieldset style="float:left; width: 680px; max-height: 160px; min-height: 30px; overflow: none;">
    <legend>Datos del SIGESIL</legend>
<?php
    
    if(!empty($datosClientes)) {

        echo '<div style="float:left; width: 680px; max-height: 100px; min-height: 30px; overflow: auto;">';
        echo '<div style="float:left; width: 1320px; max-height: 100px; min-height: 30px;">';
        echo '<table class="tabla-dialogo">
                <tr>
                    <th width="120px">Silo</th>
                    <th width="100px">Tipo</th>
                    <th width="70px">Documento</th>
                    <th width="300px">Razon Social</th>
                    <th width="130px">Condicion</th>
                    <th width="400px">Cosecha Cultivo</th>
                    <th width="50px">Cantidad</th>
                    <th width="50px">Toneladas</th>
                </tr>';

        foreach($datosClientes as $datos) {

            $datos = $datos[0];

            if($datos['documento'] != 'SIN CONEXION') {

                echo '<tr>
                        <td width="120px">' .  $datos['silo'] . '</td>
                        <td width="100px">' .  $datos['tipo']. '</td>
                        <td width="70px">' .  $datos['documento'] . '</td>
                        <td width="300px">' .  $datos['razon_social'] . '</td>
                        <td width="130px">' .  $datos['condicion']. '</td>
                        <td width="400px">' .  $datos['cosecha_cultivo']. '</td>
                        <td width="50px" align="right">' .  $datos['cantidad']. '&nbsp;&nbsp;</td>
                        <td width="50px" align="right">' .  $datos['toneladas']. '&nbsp;&nbsp;</td>
                    </tr>';    
            }
            else {
                echo '<tr>
                        <td>' .  $datos['silo'] . '</td>
                        <td colspan="7">' . $datos['documento'] . '</td>
                    </tr>';
            }
        }
        echo "</table></div></div>";
    }
    else {
        echo "<h4>No se encontro ningun dato.</h4>";
    }
?>  
</fieldset>